import { cloudService } from './index'
import { ISession } from '@/types/auth'

export const loginHomeApi = (name: string, password: string): Promise<ISession> =>
  cloudService({
    url: '/home-api/session',
    method: 'post',
    params: { name, password }
  })

export const loginAdminApi = (name: string, password: string): Promise<ISession> =>
  cloudService({
    url: '/admin-api/session',
    method: 'post',
    params: { name, password }
  })
